package com.groupbuying.customer.mq;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

/**
 * 支付中心消息MQ配置文件
 * @Author Vincentxin
 * @Date 2019-05-10
 */
@Component
public class CustomerMQConfig {
    //本中心Topic
    public static  String TOPIC ;
    public static  String GROUP_ID;
    public static final String ACCESS_KEY = "LTAIkLoCSLqX7QFG";
    public static final String SECRET_KEY = "anr8xwxEFrN4Rq0Gjw5MXxELuDb12V";
    public static final String NAMESRV_ADDR = "http://onsaddr.mq-internet-access.mq-internet.aliyuncs.com:80";



    //注入对应本中心的topic
    @Value("${RocketMQ_Key.Customer.Topic}")
    private void setTOPIC(String TOPIC) {
        CustomerMQConfig.TOPIC = TOPIC;
    }
    //注入对应本中心的groupId
    @Value("${RocketMQ_Key.Customer.GroupId}")
    private void setGroupId(String GROUPID) {
        CustomerMQConfig.GROUP_ID = GROUPID;
    }

    //用户中心手机号授权新增用户
    public static final String TAG_CUSTOMER_PHONE_NEW = "PHONENEW";
    //用户中心手机号授权修改用户
    public static final String TAG_CUSTOMER_PHONE_UPDATE = "PHONEUPDATE";

    //优惠买单用，微信注册新增用户
    public static final String TAG_CUSTOMER_WX_REGISTER_NEW="WXREGISTERNEW";
    //支付宝注册新增用户
    public static final String TAG_CUSTOMER_ALIPAY_REGISTER_NEW="ALIPAYREGISTERNEW";


    //够样的中心Topic
    public static  String GY_TOPIC;
    @Value("${RocketMQ_Key.GY.Topic}")
    public void setGYTopic(String GY_TOPIC) {
        CustomerMQConfig.GY_TOPIC = GY_TOPIC;
    }
    //够样中心的GroupID
    @Value("${RocketMQ_Key.GY.GroupId}")
    public static String GY_GroupId;
    public void setGYGroupId(String GY_GroupId){
        CustomerMQConfig.GY_GroupId = GY_GroupId;
    }

//    手机号注册tag
    public static final String MOBILE_REGISTERED = "MOBILEREGISTERED";
//    微信注册tag
    public static final String WEICA_REGISTERED = "WEICAREGISTERED";
//    支付宝注册tag
    public static final String ALI_REGISTERED = "ALIREGISTERED";


}
